﻿<local:DocumentBase x:Class="WPFExcelReport.FLTICCGLLG"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:IntexReport.DataSource"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
                  
                    FontSize="14"
                    Background="WhiteSmoke"
                    HorizontalAlignment="Stretch"  Margin="0,0,0,0"  VerticalAlignment="Stretch" 
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <db:SetData x:Key="dataSource" />
        <CollectionViewSource  x:Key="vwICC_GABEW" Source="{Binding Path=ICC_GABEW,Source={StaticResource dataSource}}">
        </CollectionViewSource>
    </local:DocumentBase.Resources>
    <Grid DataContext="" Name="main"  HorizontalAlignment="Stretch"  Margin="10,10,0,0"  VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="600" />
            <ColumnDefinition Width="400" />
        </Grid.ColumnDefinitions>
        <WrapPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Name="zoneCommand" Height="34" Margin="0,0,0,6">
            <Button    Height="40" Margin="0,0,0,0"  Name="btnQuery" Width="40" Click="btnQuery_Click" >
                <Button.Background>
                    <ImageBrush ImageSource="/IntexReportClient;component/Images/Search.png" />
                </Button.Background>
            </Button>
            <Button  Margin="10,0,0,0"  Height="40" Name="btnPrint" Width="40" Click="btnPrint_Click">
                <Button.Background>
                    <ImageBrush ImageSource="/IntexReportClient;component/Images/Print.png" />
                </Button.Background>
            </Button>            
        </WrapPanel>
        <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">            
            <WrapPanel >
                <Label Content="库"    Width="30" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtWH" Width="38" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink" CharacterCasing="Upper" FontSize="18" MaxLength="2" Text="" Foreground="#FF141111" />
                <Label Content="库区"    Width="40" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtLB" Width="50" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink" CharacterCasing="Upper" MaxLength="2" FontSize="18" Text="" Foreground="#FF141111" />
                <Label Content="日期"    Width="40" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtBYEAR" Width="50" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" Text="2011" Foreground="#FF141111" />
                <Label Content="年"    Width="20" Margin="10,0,0,0" HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtBMONTH" Width="30" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Beige" Text="10" FontSize="18" Height="30" Foreground="#FF141111" />
                <Label Content="月"    Width="20" Margin="10,0,0,0" HorizontalAlignment="Left"    FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtBDAY" Width="30" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="YellowGreen" FontSize="18" Text="01" Height="30" Foreground="#FF141111" />
                <Label Content="日"    Width="20" Margin="10,0,0,0" HorizontalAlignment="Left"    FontSize="18" VerticalAlignment="Center" />
                <Label Content="2012年6月7号即代表为6月7号早上5点的库存数据" ></Label>
                
            </WrapPanel>
        </StackPanel>
        <StackPanel Grid.Row="2"  Grid.Column="0"  Grid.ColumnSpan="2">
            <fd:FilteringDataGrid AutoGenerateColumns="False" EnableRowVirtualization="True"  
                                                ItemsSource="{Binding}" 
                                            HeadersVisibility="Column"
                                              x:Name="MasterDg" 
                                                 CanUserReorderColumns="True"  
                                  CanUserResizeColumns="True"
                                             CanUserResizeRows="True"
                                              CanUserSortColumns="True"
                                              IsFilteringCaseSensitive="False" 
                                              RowDetailsVisibilityMode="VisibleWhenSelected"   
                                              Width="1024"
                                              Height="700"
                                              EnableColumnVirtualization="True"  
                                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                              ScrollViewer.VerticalScrollBarVisibility="Auto"
                                              >
                <DataGrid.Columns>
                    <!--A.ICCGLDAT,A.ICCGLPARTIE,A.ICCGLLBEHI,A.ICCGLLO,A.ICCGLLB,A.ICCGLLP,
B.GPGART,B.GPGVAR,C.GSGARNBEZ,C.GSAGARNNR,B.GPGFARBE,D.GSCBEZ,KG,NET,GROSS-->
                    <DataGridTextColumn Binding="{Binding Path=ICCGLDAT}" Header="日期" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ICCGLPARTIE}" Header="LOT#" Width="SizeToCells"  MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=ICCGLLBEHI}" Header="BOX#" Width="SizeToCells"  MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=ICCGLLO}" Header="库" Width="SizeToCells" />
                    <DataGridTextColumn Binding="{Binding Path=ICCGLLB}" Header="区" Width="SizeToCells" />
                    <DataGridTextColumn Binding="{Binding Path=ICCGLLP}" Header="位" Width="SizeToCells"  />
                    <DataGridTextColumn Binding="{Binding Path=GPGART}" Header="纱线编号" Width="SizeToCells" />
                    <DataGridTextColumn Binding="{Binding Path=GPGVAR}" Header="Var" Width="SizeToCells" />
                    <DataGridTextColumn Binding="{Binding Path=GSGARNBEZ}" Header="纱线描述" Width="SizeToCells" />
                    <DataGridTextColumn Binding="{Binding Path=GSAGARNNR}" Header="纱线名称" Width="SizeToCells" />
                    <DataGridTextColumn Binding="{Binding Path=GPGFARBE}" Header="色号" Width="SizeToCells" />
                    <DataGridTextColumn Binding="{Binding Path=GSCBEZ}" Header="颜色" Width="SizeToCells" />
                    <DataGridTextColumn Binding="{Binding Path=KG}" Header="标重" Width="SizeToCells" />
                    <DataGridTextColumn Binding="{Binding Path=NET}" Header="净重" Width="SizeToCells" />
                    <DataGridTextColumn Binding="{Binding Path=GROSS}" Header="毛重" Width="SizeToCells" />
                </DataGrid.Columns>
            </fd:FilteringDataGrid>
        </StackPanel> 
    </Grid>
</local:DocumentBase>
